package design.patterns.dispatch.simple;

import java.awt.*;

/**
 * desc     :
 * dateTime : 2020-06-14 10:25
 *
 * @author wwchen
 */
public class Client {
    private static Point p;
    private static Point pc;

    public static void main(String[] args) {
        p = new Point();
        pc = new ColorPoint();
        // 静态多分派
        p.translate(5);
        pc.translate(5);
        pc.translate(6,10);

        // 动态单分派
        Canvas s = new Canvas();
        p.draw(s);
        pc.draw(s);
    }
}
